﻿
namespace Common
{
    /// <summary>
    /// 1-8路 继电器状态
    /// </summary>
    public class EcmdPinResponse
    {
        public static readonly string On = "on";
        public static readonly string Off = "off";

        public static string GetValueToPinResponse(string i2cValue)
        {
            string result = string.Empty;

            if (EcmdI2CResponse.Open == i2cValue)
            {
                result = On;
            }
            else if (EcmdI2CResponse.Close == i2cValue)
            {
                result = Off;
            }
            else
            {
                result = i2cValue;
            }

            return result;
        }

    }
}
